Skip to content

Instantly share code, notes, and snippets.

@vldmrtmsk
Created February 7, 2018 10:22
Show Gist options
  • Save vldmrtmsk/61c39360be53d26cf5515c29b4aef090 to your computer and use it in GitHub Desktop.
Save vldmrtmsk/61c39360be53d26cf5515c29b4aef090 to your computer and use it in GitHub Desktop.
Router.erl:
58: route(<<"admin/users/edit_name_by_id/">>) -> admin_users_edit_name_by_id;
hg.erl:
В кінці нова функція:
generate_users_name_edit_form(Security_access, Lang, User_Editing_Name) ->
Txt_Name = tr:tr(Lang, <<"users">>, <<"name">>),
[ <<"<div class=\"data_form1\">
<form name=\"edit_name_by_id\" method=\"POST\">
<label>
<p>">>, Txt_Name , <<":</p>
<input type=\"text\" name=\"name\" id=\"username\" value=\"">>, User_Editing_Name , <<"\"/>
<br />
<input type=\"submit\" value=\"Save\" onclick=\"edit_name_by_id()\"/>
</label>
</form>
</div>">> ].
tr.erl:
Майже в кінці:
%% Admin edit user
tr(<<"en">>, <<"users">>, <<"name">>) -> <<"Name">>;
tr(<<"ru">>, <<"users">>, <<"name">>) -> <<"Имя"/utf8>>;
tr(<<"ua">>, <<"users">>, <<"name">>) -> <<"Імя"/utf8>>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment