@@ -53,23 +53,6 @@ <h2 class="title border-b uppercase">Profilul organizației</h2>
53
53
< br > < br >
54
54
{% endif %}
55
55
56
- {% if voting_domain_warning %}
57
-
58
- < div class ="message is-warning ">
59
- < div class ="message-body ">
60
- < p >
61
- < strong >
62
- < i class ="fas fa-exclamation-triangle "> </ i >
63
- {% trans "Warning!" %}
64
- </ strong >
65
- </ p >
66
- < p >
67
- {{ voting_domain_warning }}
68
- </ p >
69
- </ div >
70
- </ div >
71
-
72
- {% endif %}
73
56
74
57
< div class ="container ">
75
58
{% if messages %}
@@ -82,36 +65,56 @@ <h2 class="title border-b uppercase">Profilul organizației</h2>
82
65
</ article >
83
66
{% endif %}
84
67
85
- {% if not organization.is_fully_editable %}
86
- < div class ="message {{ update_button_class }} ">
87
- < div class ="message-body flex-align-center ">
88
- < form
89
- id ="update-ngo-form "
90
- method ="post "
91
- action ="{% url 'ngo-update-post' organization.id %}?return_url={{ request.path }} ">
92
- {% csrf_token %}
93
- < button
94
- class ="button {{ update_button_class }} is-small update-ngo-button "
95
- type ="submit "
96
- title ="{% trans 'Refresh NGO Information' %} ">
97
- < i class ="fas fa-sync "> </ i >
98
- </ button >
99
- </ form >
100
-
101
- {% if organization.status == "pending" %}
102
- < h4 style ="padding-right: 2rem " class ="is-danger ">
103
- {% trans "Some data wasn't found on NGO Hub." %}
104
- </ h4 >
105
- {% endif %}
106
68
107
- < p class ="has-text-grey-dark ">
69
+ {% if voting_domain_warning and ORG_EDITING_ENABLED %}
70
+ < div class ="message is-warning ">
71
+ < div class ="message-body ">
72
+ < p >
108
73
< strong >
109
- {{ update_button_message }}
74
+ < i class ="fas fa-exclamation-triangle "> </ i >
75
+ {% trans "Warning!" %}
110
76
</ strong >
111
- ({{ update_button_description }})
77
+ </ p >
78
+ < p >
79
+ {{ voting_domain_warning }}
112
80
</ p >
113
81
</ div >
114
82
</ div >
83
+ {% endif %}
84
+
85
+ {% if not organization.is_fully_editable %}
86
+
87
+ {% if ORG_EDITING_ENABLED %}
88
+ < div class ="message {{ update_button_class }} ">
89
+ < div class ="message-body flex-align-center ">
90
+ < form
91
+ id ="update-ngo-form "
92
+ method ="post "
93
+ action ="{% url 'ngo-update-post' organization.id %}?return_url={{ request.path }} ">
94
+ {% csrf_token %}
95
+ < button
96
+ class ="button {{ update_button_class }} is-small update-ngo-button "
97
+ type ="submit "
98
+ title ="{% trans 'Refresh NGO Information' %} ">
99
+ < i class ="fas fa-sync "> </ i >
100
+ </ button >
101
+ </ form >
102
+
103
+ {% if organization.status == "pending" %}
104
+ < h4 style ="padding-right: 2rem " class ="is-danger ">
105
+ {% trans "Some data wasn't found on NGO Hub." %}
106
+ </ h4 >
107
+ {% endif %}
108
+
109
+ < p class ="has-text-grey-dark ">
110
+ < strong >
111
+ {{ update_button_message }}
112
+ </ strong >
113
+ ({{ update_button_description }})
114
+ </ p >
115
+ </ div >
116
+ </ div >
117
+ {% endif %}
115
118
116
119
< form class ="ces-form " method ="post " enctype ="multipart/form-data ">
117
120
{% csrf_token %}
@@ -137,7 +140,11 @@ <h4 style="padding-right: 2rem" class="is-danger">
137
140
{{ form|crispy }}
138
141
139
142
< div class ="has-text-right ">
140
- < input class ="button is-success " type ="submit " value ='{% trans "Update organization" %} '>
143
+ {% if CANDIDATE_EDITING_ENABLED or ORG_EDITING_ENABLED %}
144
+ < input class ="button is-success " type ="submit " value ='{% trans "Update organization" %} '>
145
+ {% else %}
146
+ < input class ="button " disabled ="disabled " value ='{% trans "Update organization" %} '>
147
+ {% endif %}
141
148
</ div >
142
149
143
150
</ form >
0 commit comments